<%@ include file="/WEB-INF/pages/taglibs.jsp" %>
<!DOCTYPE html>
<html>
  <head>
	<title>自定义报表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="decorator" content="/report/frame"/>
    <meta name="decorate-type" content="before" />
    
    <link href="${base}/css/antd/antd.css" rel="stylesheet" type="text/css" />
    <link href="${base}/css/stylesheets.css" rel="stylesheet" type="text/css" />
    <link href="${base}/css/datatables/datatables.css" rel="stylesheet" type="text/css" />
    <link href="${base}/css/infopanel/cybertron.infopanel.css" rel="stylesheet" type="text/css" />
    <link href="${base}/css/ztree/zTreeStyle.css" rel="stylesheet" type="text/css" />
    <link href="${base}/css/cybertron/stylesheet.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="${base}/js/react/react.js"></script>
    <script type="text/javascript" src="${base}/js/react/react-dom.js"></script>
    <script type="text/javascript" src="${base}/js/antd/antd.js"></script>

    <script type='text/javascript' src='${base}/js/jquery/jquery.min.js'></script>
    <script type='text/javascript' src='${base}/js/jquery/jquery-ui.min.js'></script>
    <script type='text/javascript' src='${base}/js/jquery/jquery-migrate.min.js'></script>
    <script type='text/javascript' src='${base}/js/jquery/globalize.js'></script>
    <script type='text/javascript' src="${base}/js/bootstrap/bootstrap.min.js"></script>

    <script type="text/javascript" src="${base}/js/plugins/mousewheel/jquery.mousewheel.min.js" ></script>
    <script type='text/javascript' src='${base}/js/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js'></script>

    <script type="text/javascript" src="${base}/js/plugins/datatables/datatables.min.js"></script>
    <script type="text/javascript" src="${base}/js/plugins/infopanel/cybertron.infopanel.js"></script>

    <script type="text/javascript" src="${base}/js/cybertron/core.js"></script>
    
    <script type="text/javascript" src="${base}/js/plugins/validate/jquery.validate.js"></script>
	<script type="text/javascript" src="${base}/js/plugins/validate/jquery.validate.ext.methods.js"></script>
	<script type="text/javascript" src="${base}/js/plugins/form/jquery.form.min.js"></script>
  </head>

  <body data-module="report">

<div id="content-container">
    
	<div class="row">
		<div class="col-md-12">
			<div class="btn-group">
				<button id="btn-add-custom-report" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	                <i class="fa fa-plus-circle"></i>
	                <fmt:message key="button.add" />
	            </button>
	            <ul id="dropdown-add-custom-report" class="dropdown-menu" >
	            <c:forEach items="${supported_custom_types }" var="customtype">
					<li><a href="${base }/report/custom/start?type=${customtype}" data-toggle="infopanel" data-infopanel="#edit-custom-report-infopanel" target="edit-custom-report-iframe"><fmt:message key="report.custom.type.${customtype }" bundle="${i18n_report}" /></a></li>
				</c:forEach>
				</ul>
	            <button id="btn-del-custom-report" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#del-report-confirm-modal" disabled>
	                <i class="fa fa-trash"></i>
	                <fmt:message key="button.delete" />
	            </button>
			</div>
            <!-- <div class="col-md-2 search-group">
            	<span class="search-ico"><i class="fa fa-search"></i></span>
            	<span class="search-clear"><i class="fa fa-times-circle"></i></span>
            	<input type="text" class="form-control" placeholder="..." >
            </div> -->
		</div>
	</div>
    
    <!-- 下载报表 -->
    <form method="post" action="${base}/report/exportreport" method="POST" data-validate-type="client">
		<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
    </form>
    
    <!-- 添加自定义报表 -->
    <div id="edit-custom-report-infopanel" class="info-panel col-md-8" tabindex="-1" role="dialog" aria-hidden="true">
    	<button class="info-panel-side-button info-panel-close close">
			<i class="fa fa-chevron-right"></i>
		</button>
		<div class="info-panel-title"><fmt:message key="button.add" />报表</div>
		<div class="info-panel-content" data-spy="scroll" data-target="#navbar-custom-report-info">
    		<!-- 16:9 aspect ratio -->
			<div class="embed-responsive embed-responsive-16by9">
			  	<iframe name="edit-custom-report-iframe" class="embed-responsive-item" border="0" src=""></iframe>
			</div>
	    </div>
    </div>
</div>    

<div id="script-container">
	<script type="text/javascript">
	$(document).ready(function(){
		$(document).on("click", '#dropdown-add-custom-report li a', function(e){
			// 加载自定义报表添加页面return false;
			
			
		}).on("change.search", '.search-group', function(e){
			// 获取查询输入框的值
			var value = $(this).find('input.form-control').val();
		}).on("click", '#nav-tabs-container button.next', function(e){
			// 下一步
			
		});
	});
	</script>
</div>
</body>
</html>